/* eslint-disable new-cap,no-undef */
class interceptor{
// eslint-disable-next-line class-methods-use-this
  dataInterceptor ( data ){
    const TYPE = typeof data.data;
    console.log(data);
    switch (TYPE){
      case 'list':
        return {status:data.status,list:data.data};
      case 'object':
        return {status:data.status,data:{...data.data}}
      default:
        return data.data;
    }
  }
}
export default new interceptor().dataInterceptor;
